int shape[7][4][18]; //7代表其中图形，4表示四种变化，18表示16个各自，剩余的2表示距离右边的距离。

int init_x = 24;
int init_y = 6;
//struct termios tm_old;
//变换图形坐标
int dynamic_x, dynamic_y;
int dynamic_type, dynamic_changeType;


//初始化
int type, change_type,x,y,color;
int score_x = 45; 
int score_y = 18; 
int level_x = 45; 
int level_y = 22; 
int score = 0;
int level = 1;

int interval = 800000;

int color = 44;
int color_init =47;
int color_background = 30;



//下一个图形
int next_type = -1;
int next_change_type;
int next_x = 46;
int next_y = 7;

int matrix[24][28] = {0};

int shape[7][4][18] = 
{
 {
    {1,1,0,0, 1,1,0,0, 0,0,0,0, 0,0,0,0, 2,2}, 
    {1,1,0,0, 1,1,0,0, 0,0,0,0, 0,0,0,0, 2,2}, 
    {1,1,0,0, 1,1,0,0, 0,0,0,0, 0,0,0,0, 2,2}, 
    {1,1,0,0, 1,1,0,0, 0,0,0,0, 0,0,0,0, 2,2}, 
 },
 {
    {1,0,0,0, 1,0,0,0, 1,0,0,0, 1,0,0,0, 3,0}, 
    {1,1,1,1, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,3}, 
    {1,0,0,0, 1,0,0,0, 1,0,0,0, 1,0,0,0, 3,0}, 
    {1,1,1,1, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,3}, 
 },
 {
    {0,1,0,0, 1,1,1,0, 0,0,0,0, 0,0,0,0, 1,2}, 
    {1,0,0,0, 1,1,0,0, 1,0,0,0, 0,0,0,0, 2,1}, 
    {1,1,1,0, 0,1,0,0, 0,0,0,0, 0,0,0,0, 1,2}, 
    {0,1,0,0, 1,1,0,0, 0,1,0,0, 0,0,0,0, 2,1} 
 },
 {
    {1,1,0,0, 0,1,1,0, 0,0,0,0, 0,0,0,0, 1,2}, 
    {0,1,0,0, 1,1,0,0, 1,0,0,0, 0,0,0,0, 2,1}, 
    {1,1,0,0, 0,1,1,0, 0,0,0,0, 0,0,0,0, 1,2}, 
    {0,1,0,0, 1,1,0,0, 1,0,0,0,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